package com.atguigu.yygh.order.service;

import com.atguigu.yygh.model.order.OrderInfo;
import com.atguigu.yygh.vo.order.OrderCountQueryVo;
import com.atguigu.yygh.vo.order.OrderQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

public interface OrderService extends IService<OrderInfo> {

    /**
     * 保存订单
     * @param scheduleId    科室id
     * @param patientId     就诊人id
     * @return
     */
    Long saveOrder(String scheduleId, Long patientId);

    /**
     * 分页列表
     * @param pageParam
     * @param orderQueryVo
     * @return
     */
    IPage<OrderInfo> selectPage(Page<OrderInfo> pageParam, OrderQueryVo orderQueryVo);

    /**
     * 根据订单id获取订单详情
     * @param orderId   订单id
     * @return
     */
    OrderInfo getOrderInfo(String orderId);

    /**
     * 展示订单详情
     * @param orderId   订单id
     * @return
     */
    Map<String,Object> show(Long orderId);

    /**
     * 取消订单
     * @param orderId   订单id
     * @return
     */
    Boolean cancelOrder(Long orderId);

    /**
     * 就诊提醒
     */
    void patientTips();

    /**
     * 预约订单统计
     * @param orderCountQueryVo 订单统计实体类
     * @return
     */
    Map<String, Object> getCountMap(OrderCountQueryVo orderCountQueryVo);

}
